# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=flunym0us
pkgver=2.0
pkgrel=6
groups=('blackarch' 'blackarch-scanner' 'blackarch-webapp')
pkgdesc='A Vulnerability Scanner for Wordpress and Moodle.'
arch=('any')
url='http://code.google.com/p/flunym0us/'
license=('GPL3')
depends=('python2')
source=("http://flunym0us.googlecode.com/files/${pkgname}${pkgver}.tar.gz")
sha512sums=('ecf8c9db6097accf39231c332bbfd26e6d2aad8c')

prepare(){
  sed -i '1i#!/usr/bin/env python2\n' *.py
}

package() {
  install -dm 755 "$pkgdir/usr/bin/"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  cp -r --no-preserve=ownership *.{lst,py} "$pkgdir/usr/share/$pkgname/"

  chmod +x "$pkgdir/usr/share/$pkgname/$pkgname.py"

  ln -s "/usr/share/$pkgname/$pkgname.py" "$pkgdir/usr/bin/$pkgnamme"
}

